<template>
    <div class="charts" ref="bar"></div>
</template>

<script>
    import echarts from 'echarts'
    export default {
        name: "index",

        mounted() {
            let barCharts = echarts.init(this.$refs.bar);
            barCharts.setOption({
                xAxis: {
                    show: false,
                    // 均分
                    type: 'category'
                },
                yAxis: {
                    show: false,
                },
                series: [
                    {
                        type: 'bar',
                        data: [10,7,22,12,48,9,29,10,44,12,32],
                        color:'cyan'
                    }
                ],
                grid: {
                    left: 10,
                    top: 10,
                    bottom: 10,
                    right:10,
                },
                tooltip: {}
            });
        }
    }
</script>

<style scoped>
    .charts {
        width: 100%;
        height: 100%;
    }
</style>
